﻿@inject IDbFieldRelationTypeService dbTypeService
@{
    ViewData["Title"] = "服务器列表";
    Layout = "../Shared/_Layout.cshtml";
    ViewBag.BodyCss = "fixed-sidebar no-skin-config full-height-layout  pace-done";
    var dbTypeAll = dbTypeService.GetAll();
    var ControlTypeAll = ConvertHelper.ToEnumList(typeof(ControlType), true);
}

@section links{

}

<div class="fh-breadcrumb">
    <div class="fh-column">
        <div class="full-height-scroll">
            <div class="jstree codeserver">

            </div>
        </div>
    </div>

    <div class="full-height">
        <div class="full-height-scroll white-bg border-left ">
            <div class="tabs-container">
                <ul class="nav nav-tabs">
                    <li class="code-columns active">
                        <a data-toggle="tab" href="#tab-1">
                            <i class="fa fa-columns"></i>  字段属性
                        </a>
                    </li>
                    <li class="code-datasource">
                        <a data-toggle="tab" href="#tab-2">
                            <i class="fa fa-list"></i>列表数据
                        </a>
                    </li>
                    <li class="code-code">
                        <a data-toggle="tab" href="#tab-3">
                            <i class="fa fa-code"></i>生成代码
                        </a>
                    </li>
                </ul>
                <div class="tab-content">
                    <div id="tab-1" class="tab-pane active">
                        <div class="columns-container">
                            <div class="jqGrid_wrapper">
                                <table id="table_list_Columns"></table>
                                <div id="pager_list_Columns"></div>
                            </div>
                        </div>
                    </div>
                    <div id="tab-2" class="tab-pane ">
                        <div class="jqGrid_wrapper">
                            <table id="table_list_DataSource"></table>
                            <div id="pager_list_DataSource"></div>
                        </div>
                    </div>
                    <div id="tab-3" class="tab-pane ">
                        <div class="fh-column" style="width:200px;">
                            <div class="jstree templateTree">

                            </div>
                        </div>
                        <div class="full-height">
                            <div class="full-height-scroll white-bg  ">
                                <div class="tab-content">
                                    <textarea id="create-code" name="create-code" class="form-control codemirror" validate="{required:false   }" rows="10"></textarea>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

    </div>
</div>
<a style="display:none;" id="linkExport" href="javascript://" target="_blank"></a>
@section scripts{

<script type="text/javascript">
        BaseUrl = "@Url.Content("~/code")";

        DbTypeAll=@Html.Raw(dbTypeAll.ToJson());
        ControlTypeList=@Html.Raw(ControlTypeAll.ToJson());
        strControlTypeList="";
        $(document).ready(function(){
            CodeService.InitTree();
            CodeService.loadColumns(0,1);
           // editor.setValue($("#create-code").val());
        });


</script>

}